package com.example.course.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 课程数据传输对象，用于创建或更新课程
 *
 * @author Jasmine-drs
 * @date 2025/4/25 10:30
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "CourseDTO", description = "课程数据传输对象")
public class CourseDTO {

	@ApiModelProperty("课程ID，新增时不需要传")
	private Integer id;

	@NotBlank(message = "课程名称不能为空")
	@Size(max = 16, message = "课程名称长度不能超过16")
	@ApiModelProperty(value = "课程名称", required = true)
	private String name;

	@Size(max = 64, message = "上课时间长度不能超过64")
	@ApiModelProperty("上课时间")
	private String schoolTime;

	@NotBlank(message = "课程代码不能为空")
	@Size(max = 16, message = "课程代码长度不能超过16")
	@ApiModelProperty(value = "课程代码", required = true)
	private String courseNum;

	@NotNull(message = "上课教师ID不能为空")
	@ApiModelProperty(value = "上课教师ID", required = true)
	private Integer teacherId;
} 